class Department < ActiveRecord::Base
  has_many :employee
  belongs_to :company

  belongs_to :parent ,:class_name =>'Department' ,:foreign_key =>'parent_id'
  has_many :children ,:class_name =>'Department' ,:foreign_key =>'parent_id'

  has_many :employees
end
